public class Person{
    //成员变量
    private String name;
    private int age;

    //get/set方法
    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }
    

    public void setName(String name) {
        this.name = name;
    }
    public void setAge(int age) {
        this.age = age;
    }

    //无参构造器
    public Person(){

    }

    //两参构造器
    public Person(String name,int age){
        this.name=name;
        this.age=age;
    }

    //一参构造器
    public Person(String name){
        //借助两参构造器的方法
        //this.name=name;
        this(name,-1);
    }

    public void  show(){
        System.out.println("name:"+name+"  age:"+age);
    
    }
}